BABO 16:02:46
<template>
  <div class="dashborad">
    <div class="top">
      <el-card class="box-card">
        <!-- <div slot="header" class="clearfix">
          <span>卡片名称</span>
          <el-button style="float: right; padding: 3px 0" type="text">操作按钮</el-button>
        </div> -->
        <div class="main">
          <div class="m-left">
            <img src="@/assets/common/img.jpeg">
          </div>
          <div class="m-right">
            <div class="mr-top">
              下午好,我是张宇骑马
            </div>
            <div class="mr-btom">
              湖北汪响响
            </div>

          </div>
        </div>

      </el-card>
    </div>
    <div class="bottom">
      <!-- 下面的部分，分为左右两个部分，使用el-row el-col进行布局 -->
      <el-row>
        <el-col :span="14">
          <div style="padding-right: 30px">
            <el-calendar>
              <!-- 这里使用的是 2.5 slot 语法，对于新项目请使用 2.6 slot 语法-->
              <template
                slot="dateCell"
                slot-scope="{date, data}"
              >
                <div class="my-date">
                  <span>{{ getCurentDate(data.day) }}</span>
                  <span v-if=" isWeekend(date) " class="item-2">休</span>
                </div>
                <!-- <p :class="data.isSelected ? 'is-selected' : ''">
                  {{ data.day.split('-').slice(1).join('-') }} {{ data.isSelected ? '✔️' : '' }}
                </p> -->
              </template>
            </el-calendar>
            <el-card class="box-card">
              <div slot="header" class="clearfix">
                <span>卡片名称</span>
                <el-button style="float: right; padding: 3px 0" type="text">操作按钮</el-button>
              </div>
              <div v-for="o in 4" :key="o" class="text item">
                {{ '列表内容 ' + o }}
              </div>
            </el-card>
          </div>
        </el-col>
        <el-col :span="10">
          <el-card class="box-card">
            <div slot="header" class="clearfix">
              <span>卡片名称</span>
              <el-button style="float: right; padding: 3px 0" type="text">操作按钮</el-button>
            </div>
            <div v-for="o in 4" :key="o" class="text item">
              {{ '列表内容 ' + o }}
            </div>
          </el-card>
          <el-card class="box-card">
            <!-- 这里是雷达图 -->
            <RadixCom />
          </el-card>
          <el-card class="box-card">

            <div class="last">
              <div class="l-header">
                <!-- 上面标题 -->
                <span>帮助链接</span>
              </div>
              <!-- 下面内容 -->
              <div class="l-main">内容</div>
            </div>

          </el-card>
        </el-col>
      </el-row>
    </div>
  </div>
</template>

<script>
import RadixCom from '@/views/dashboard/radixCom.vue'
export default {
  name: '',
  components: {
    RadixCom
  },
  data() {
    return {}
  },
  methods: {
    getCurentDate(date) {
      // console.log(date, 66666666)
      // console.log(date.slice(8))
      const currentDateStr = date.slice(8)
      return currentDateStr.startsWith('0') ? currentDateStr.slice(1) : currentDateStr
    },
    isWeekend(data) {
      // getDay()是时间对象函数的方法就是星期
      console.log(data.getDay())
      const one = data.getDay()
      if (one === 0 || one === 6) {
        return true
      }
    }
  }
}
</script>

<style lang="scss" scoped>
.dashborad {
  margin: 15px;
  .top {
    margin-bottom: 15px;
  }
  .el-card {
    margin-bottom: 15px;
  }
  .main{
    display: flex;
    img{
      display: block;
      width: 100px;
    }
  }
  .m-right{
    display: flex;
    flex-direction: column;
    justify-content:space-around;
   .mr-top{
    font-size: 22px;
    font-weight: 700;
   }
   .mr-btom{
    position: relative;
    top:-15px;
    left:5px

   }

  }
   .my-date{
      display:flex;
         justify-content:space-around;
         padding: 0 4px;
.item-2{
  display: block;
  width: 25px;
  height: 25px;
  background-color: yellow;
  text-align: center;
  line-height: 25px;

  border-radius: 50%;
}
    }
    .last{
      .l-header{
        font-size: 25px;
        font-weight: 600;
        span{
          border-bottom: 5px solid pink;
          padding-bottom: 10px;
        }
      }
      .l-main{
        margin-top: 25px
        ;
      }
    }
}
</style>

